package com.zhijian.wharf.dao;



import com.zhijian.wharf.entity.po.UserRole;
import com.zhijian.wharf.entity.vo.request.UserRoleSearchVo;
import com.zhijian.wharf.entity.vo.response.UserRoleVo;

import java.util.List;

public interface UserRoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserRole record);

    int insertSelective(UserRole record);

    UserRole selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(UserRole record);

    int updateByPrimaryKey(UserRole record);

    int count(UserRoleSearchVo userRoleSearchVo);

    List<UserRoleVo> selectList(UserRoleSearchVo userRoleSearchVo);

    UserRoleVo selectVoById(Long id);

    /**
     * 根据人员id查询所有的角色id
     *
     * @param userId
     * @return
     */
    List<Long> selectRolesByUserId(Long userId);

    /**
     * 根据人员id删除
     *
     * @param userId
     */
    void deleteByUserId(Long userId);
}